﻿@inject AppState AppState

<Panel Width="200" Height="100" BackColor="SystemColors.Info">
    <Button Width="40" Text="+1" OnClick="@HandleClick" />
    <Label Left="50" Width="200" Text="@("You have pressed " + AppState.Counter + " times")" />
</Panel>

@code {
    void HandleClick()
    {
        AppState.Counter++;
    }
}
